"""
@Author  : 康帅
@Time    : 2021/8/3 18:24
@Function: csv
"""


import csv


def reader_csv_file():
    """
    reader读取csv文件
    :return:
    """
    with open("data_01.csv", "rt", encoding="utf-8") as csv_file:
        reader = csv.reader(csv_file)
        for rows in reader:
            print(rows)


def dict_reader_csv_file():
    """
    DictReader读取csv文件
    :return:
    """
    with open("data_01.csv", 'rt', encoding="utf-8") as csv_file:
        dict_reader = csv.DictReader(csv_file)
        for row in dict_reader:
            print(row)


if __name__ == '__main__':
    reader_csv_file()
    dict_reader_csv_file()
